#include "clientcounter.hh"

clientCounter::clientCounter()
{
    _clientCount = 0;
    _execCount = 0;
}

void clientCounter::AddClient()
{
    lock();
    _clientCount = _clientCount + 1;
    unlock();
}

void clientCounter::RemoveCLient()
{
    lock();
    _clientCount = _clientCount - 1;
    unlock();
}

void clientCounter::RemoveExec()
{
    lock();
    _execCount = _execCount - 1;
    unlock();
}

int clientCounter::GetClientNumber()
{
    int tmp;

    lock();
    tmp = _clientCount;
    unlock();

    return (tmp);
}

int clientCounter::GetExecNumber()
{
    int tmp;

    lock();
    tmp = _execCount;
    unlock();

    return (tmp);
}


void clientCounter::AddExec()
{
    lock();
    _execCount = _execCount + 1;
    unlock();
}
